package com.lerays.yuan.AI_Robot.util;

public class Connect {
        private CommonParam cp;
        private DB_Connect conn;
        private String host;
        private String database;
        private String port;
        private String username;
        private String password;
                
        public Connect(){
                  
        }
        
        public DB_Connect connectDb(){
                setParam();
                conn = new DB_Connect();
                conn.dbConnection(host, port, database, username, password);
                return conn;         
        }
        
        public void setParam(){
                cp = new CommonParam();
                host = cp.getString("host");
                database = cp.getString("database");
                port = cp.getString("port");
                username =cp.getString("username");
                password = cp.getString("password");
        }
}